<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fns" uri="/WEB-INF/tlds/fns.tld" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>

<c:set var="ctx" value="${pageContext.request.contextPath}"/>


<h2>
    ${empty paper.id?"编辑论文":"修改论文"}
</h2>
<div class="error class alert-danger" style="display: none;padding:10px 0 8px 10px"></div>
<form id="paper-form" class="form-horizontal" role="form" style="padding-left: 10px;">
    <div class="row">
        <div class="col-md-8">
            <input type="hidden" id="id" name="id" value="${paper.id }"/>
            <div class="form-group">
                <label class="col-sm-2 control-label">论文：</label>
                <input type="hidden" id="photo-id" name="attachment" value="${paper.attachment}"/>
                <div class="col-sm-8">
                    <div class="media" style="border-bottom: 0;">
                        <div class="media-body  visible-sm visible-md visible-lg" style="width: 200px;">
                            <input type="file" name="file[]" id="fileUpload">
                                <%--<input id="fileupload" type="file" name="file[]" multiple>--%>
                        </div>
                    </div>
                </div>
            </div>
            <input type="hidden" id="attachment" value="">
            <div class="form-group">
                <label for="choice.id" class=" col-sm-2 control-label">选题：</label>
                <div class="col-sm-4">
                    <%--<input type="text" class="form-control input-sm " id="choice.id" name="paper.choice.topic.id" value="${paper.choice.topic.id}">--%>
                </div>
            </div>


            <div  style="clear: both">
                <shiro:hasPermission name="sys:menu:edit">
                    <button id="paper-submit" class="btn btn-primary btn-sm" type="button">保 存</button>
                </shiro:hasPermission>
                <button id="paper-cancel" class="btn btn-sm" type="button" onclick="history.go(-1)">返 回</button>
            </div>
        </div>
    </div>
</form>

<script type="text/javascript">
    <c:if test="${env == 'pro' }">
    requirejs(['${ctx}/assets/js/app/admin/paper-form-page.js']);
    </c:if>
    <c:if test="${env != 'pro' }">
    requirejs(['${ctx}/assets/js/app/admin/paper-form-page.js']);
    </c:if>
</script>
